#!/usr/bin/env python
#-*- coding:utf-8 -*-

class pyQ:
	elements = []
	
	def __init__(self, elements = []):
		self.elements = elements
	
	def pop(self):
		if self.elements:
			return self.elements.pop(0)
		else:
			return None
	
	def push(self, element):
		return self.elements.append(element)
	
	def flush(self):
		while self.pop():
			1
	
	def __bool__(self):
		return len(self.elements)>0
